package com.huawei.appmarket.service.store.awk.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.store.awk.bean.BannerV9CardBean;
import com.huawei.appmarket.service.store.awk.bean.BannerV9ListCardBean;
import com.huawei.appmarket.service.store.awk.card.TwoLeafGrassLandscapeCard;
import com.huawei.appmarket.service.store.awk.node.VerticalMultiTabsEntranceNode.b;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import o.azb;
import o.chz;
import o.ebk;
import o.eig;
import o.eis;
import o.ewm.h;
import o.frj;
import o.frk;
import o.fry;
import o.fsc;
import o.fsd;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000V\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010\u000b\u001a\u00020\f2\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0002J \u0010\r\u001a\u00020\f2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0010\u001a\u00020\u0011H\u0016J \u0010\u0012\u001a\u00020\f2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0010\u001a\u00020\u0011H\u0016J\u0010\u0010\u0013\u001a\n\u0012\u0004\u0012\u00020\u0015\u0018\u00010\u0014H\u0016J\u0010\u0010\u0016\u001a\n\u0012\u0004\u0012\u00020\u0015\u0018\u00010\u0014H\u0016J\b\u0010\u0017\u001a\u00020\u0018H\u0016J\b\u0010\u0019\u001a\u00020\u0018H\u0016J\u001c\u0010\u001a\u001a\u00020\u00182\b\u0010\u001b\u001a\u0004\u0018\u00010\u001c2\b\u0010\u001d\u001a\u0004\u0018\u00010\u0011H\u0016R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\t\u001a\u0004\u0018\u00010\nX\u000e¢\u0006\u0002\n\u0000¨\u0006\u001e"}, d2 = {"Lcom/huawei/appmarket/service/store/awk/node/TwoLeafGrassNode;", "Lcom/huawei/appmarket/service/store/awk/node/VerticalMultiTabsEntranceNode;", "context", "Landroid/content/Context;", "(Landroid/content/Context;)V", "interactiveControl", "Lcom/huawei/appmarket/service/interactive/control/InteractiveControl;", "landscapeCard", "Lcom/huawei/appmarket/service/store/awk/card/TwoLeafGrassLandscapeCard;", "portraitCard", "Lcom/huawei/appmarket/service/store/awk/card/VerticalMultiTabsBannerCard;", "adjustInteractiveControl4Ring", "", "createCard4Landscape", "layoutInf", "Landroid/view/LayoutInflater;", "rootLayout", "Landroid/view/ViewGroup;", "createCard4Portrait", "getExposureDetail", "Ljava/util/ArrayList;", "", "getExposureExceptCard", "isCalculateChild", "", "isCompositeComponent", "setData", "dataItem", "Lcom/huawei/appgallery/foundation/ui/framework/cardkit/bean/CardChunk;", "parent", "WiseDist_release"}, k = 1, mv = {1, 1, 15})
public final class TwoLeafGrassNode extends VerticalMultiTabsEntranceNode {
    private ebk ʻ;
    private eig ˊ;
    private TwoLeafGrassLandscapeCard ॱॱ;

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/huawei/appmarket/service/store/awk/card/VerticalMultiTabsBannerCard;", "invoke"}, k = 3, mv = {1, 1, 15})
    static final class a extends fsc implements fry<eig> {
        final /* synthetic */ Context ˊ;
        final /* synthetic */ TwoLeafGrassNode ˋ;
        final /* synthetic */ View ॱ;

        a(TwoLeafGrassNode twoLeafGrassNode, View view, Context context) {
            this.ˋ = twoLeafGrassNode;
            this.ॱ = view;
            this.ˊ = context;
            super(0);
        }

        public /* synthetic */ Object ˋ() {
            return ॱ();
        }

        @NotNull
        public final eig ॱ() {
            this.ˋ.ʻ = new ebk();
            ebk ˏ = this.ˋ.ʻ;
            if (ˏ != null) {
                ˏ.ˎ(this.ॱ);
            }
            ˏ = this.ˋ.ʻ;
            if (ˏ != null) {
                ˏ.ˊ(this.ॱ);
            }
            this.ˋ.ˊ(this.ˋ.ʻ);
            eig o_eig = new eig(this.ˊ, this.ˋ.ˋ(), b.ˏ);
            o_eig.ˋ(this.ˋ.ʻ);
            this.ˋ.ˊ(o_eig);
            o_eig.ˏ(this.ॱ);
            return o_eig;
        }
    }

    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/huawei/appmarket/service/store/awk/card/TwoLeafGrassLandscapeCard;", "invoke"}, k = 3, mv = {1, 1, 15})
    static final class d extends fsc implements fry<TwoLeafGrassLandscapeCard> {
        final /* synthetic */ TwoLeafGrassNode ˊ;
        final /* synthetic */ Context ˎ;
        final /* synthetic */ View ॱ;

        d(TwoLeafGrassNode twoLeafGrassNode, View view, Context context) {
            this.ˊ = twoLeafGrassNode;
            this.ॱ = view;
            this.ˎ = context;
            super(0);
        }

        public /* synthetic */ Object ˋ() {
            return ˎ();
        }

        @NotNull
        public final TwoLeafGrassLandscapeCard ˎ() {
            this.ˊ.ʻ = new ebk();
            ebk ˏ = this.ˊ.ʻ;
            if (ˏ != null) {
                ˏ.ˎ(this.ॱ);
            }
            ˏ = this.ˊ.ʻ;
            if (ˏ != null) {
                ˏ.ˊ(this.ॱ);
            }
            this.ˊ.ˊ(this.ˊ.ʻ);
            TwoLeafGrassLandscapeCard twoLeafGrassLandscapeCard = new TwoLeafGrassLandscapeCard(this.ˎ);
            twoLeafGrassLandscapeCard.ॱ(this.ˊ.ʻ);
            this.ˊ.ˊ(twoLeafGrassLandscapeCard);
            View view = this.ॱ;
            fsd.ॱ(view, "panelView");
            twoLeafGrassLandscapeCard.ˏ(view);
            return twoLeafGrassLandscapeCard;
        }
    }

    public TwoLeafGrassNode(@NotNull Context context) {
        fsd.ˊ((Object) context, "context");
        super(context);
    }

    public boolean ॱ() {
        return true;
    }

    @Nullable
    public ArrayList<String> z_() {
        switch (eis.ˋ[ˋ().ordinal()]) {
            case 1:
                CardBean ˌ;
                List ˊ;
                ArrayList<String> arrayList;
                TwoLeafGrassLandscapeCard twoLeafGrassLandscapeCard = this.ॱॱ;
                if (twoLeafGrassLandscapeCard != null) {
                    ˌ = twoLeafGrassLandscapeCard.ˌ();
                } else {
                    ˌ = null;
                }
                if (!(ˌ instanceof BannerV9ListCardBean)) {
                    ˌ = null;
                }
                BannerV9ListCardBean bannerV9ListCardBean = (BannerV9ListCardBean) ˌ;
                if (bannerV9ListCardBean != null) {
                    ˊ = bannerV9ListCardBean.ˊ();
                    if (ˊ != null) {
                        Iterable<BannerV9CardBean> iterable = ˊ;
                        Collection arrayList2 = new ArrayList(frk.ˏ(iterable, 10));
                        for (BannerV9CardBean bannerV9CardBean : iterable) {
                            StringBuilder stringBuilder = new StringBuilder();
                            fsd.ॱ(bannerV9CardBean, "it");
                            arrayList2.add(stringBuilder.append(bannerV9CardBean.ॱॱ()).append("#$#").append(bannerV9CardBean.u_()).toString());
                        }
                        ˊ = (List) arrayList2;
                        arrayList = new ArrayList();
                        arrayList.addAll(ˊ);
                        return arrayList;
                    }
                }
                ˊ = frj.ˎ();
                arrayList = new ArrayList();
                arrayList.addAll(ˊ);
                return arrayList;
            case 2:
                eig o_eig = this.ˊ;
                return o_eig != null ? o_eig.ˋ() : null;
            default:
                throw new NoWhenBranchMatchedException();
        }
    }

    @Nullable
    public ArrayList<String> ˋॱ() {
        ebk o_ebk = this.ʻ;
        return o_ebk != null ? o_ebk.ˋ() : null;
    }

    public boolean ʽ() {
        ebk o_ebk = this.ʻ;
        return (o_ebk != null ? o_ebk.ˎ() : null) != null;
    }

    public void ˋ(@NotNull LayoutInflater layoutInflater, @NotNull Context context, @NotNull ViewGroup viewGroup) {
        fsd.ˊ((Object) layoutInflater, "layoutInf");
        fsd.ˊ((Object) context, "context");
        fsd.ˊ((Object) viewGroup, "rootLayout");
        View inflate = layoutInflater.inflate(h.ᐝﾟ, viewGroup);
        fsd.ॱ(inflate, "layoutInf.inflate(R.layo…ortrait_card, rootLayout)");
        this.ˊ = (eig) new a(this, inflate, context).ˋ();
    }

    public void ˎ(@NotNull LayoutInflater layoutInflater, @NotNull Context context, @NotNull ViewGroup viewGroup) {
        fsd.ˊ((Object) layoutInflater, "layoutInf");
        fsd.ˊ((Object) context, "context");
        fsd.ˊ((Object) viewGroup, "rootLayout");
        View inflate = layoutInflater.inflate(h.ᐠ, viewGroup);
        azb.ˎ(inflate);
        this.ॱॱ = (TwoLeafGrassLandscapeCard) new d(this, inflate, context).ˋ();
    }

    public boolean ॱ(@Nullable chz o_chz, @Nullable ViewGroup viewGroup) {
        ebk o_ebk = this.ʻ;
        if (o_ebk != null) {
            o_ebk.ॱ(o_chz != null ? o_chz.ʻ() : null);
        }
        return super.ॱ(o_chz, viewGroup);
    }

    private final void ˊ(ebk o_ebk) {
        if (o_ebk != null) {
            View ˏ = o_ebk.ˏ();
            if (ˏ != null) {
                Context context = this.ॱ;
                fsd.ॱ(context, "context");
                ˏ.setPaddingRelative((int) context.getResources().getDimension(o.ewm.d.ˊ), ˏ.getPaddingTop(), ˏ.getPaddingEnd(), ˏ.getPaddingBottom());
            }
        }
    }
}
